home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 76 / MacAddict_076_2002_12.iso / Files from the Print Side / MacAddict E-Card Tutorial / CreateAHolidayE-Card-Advanced < prev    next >
Text File  |  2002-09-30  |  5KB  |  35 lines

  1. Create a Holiday E-Card, Part II—Advanced Scripting
  2. By Chris Florio
  3.  
  4.  
  5. Looking to become a Flash pro? Then you’ll want to learn the very important art of scripting. Mastering Flash’s ActionScript language helps ensure optimum media performance despite the type of end-user connection. Due to the lack of space in our magazine, we decided to split off this “advanced” section on the Disc for those ambitious types who are looking to take their Flash skills to a deeper level with scripting. These next steps should be performed after you complete step 9 but before step 10—the publishing part.
  6.  
  7. Because viewers have Internet connections rated at different speeds (T1, DSL, Cable modem, dial-up modem, etc.), it’s desirable to create content that can perform well across all type of connections. For your holiday greeting, set-up an ActionScript to have your e-card movie loop the first section (the text animation part) continuously until the second, larger section (the singing mouth part) downloads, and then have the movie jump to the second part and play it out to the end. This will keep viewers with even the slowest connections entertained while your Flash movie continues to download.
  8.  
  9. To do this, after completing step 9, insert a new layer at the top of the Timeline and name it “Actions.” Add a keyframes in this layer on frames 48, 49, and 50, and then add a final keyframe on the last frame of your movie. Click frame 1 of the Action layer and in the Properties window, type “Section1” in the Frame field. Click frame 50 and type “Section2” in the Frame field in the Properties window. Then click the last frame of your movie in the Actions layer and name it “Last” in the Properties window. 
  10.  
  11. From the Window menu, select Actions to open the Actions window. The ActionScript window features “books” of prewritten scripts in the left column, while the right pane is used to assemble scripts. Click frame 49 in the Actions layer and in the left column of the Actions window, click Actions to reveal its options. Click Movie Control underneath it, and then double-click the GoTo action that appears underneath it. The GoTo parameters will appear on the right. From the Type pop-up menu, select FrameLabel. From the Frame pop-up, select Section1. This will make Section1 (your text animation) loop infinitely.
  12.  
  13. To make Section1 seamlessly jump to Section2 when Section2 finishes loading, click frame 48 in the Actions layer. In the ActionScript window, click Deprecated in the left column, click Actions, and then double-click IfFrameLoaded. From the Type pop-up menu, select Frame Label; from the Frame pop-up menu, select Last. With the first line of the IfFrameLoaded script highlighted in the window’s right pane, click Actions from the left column, then Movie Control, and then double-click the GoTo action. Select FrameLabel from the Type pop-up menu and then select Section2 from the Frame pop-up menu. 
  14.  
  15. Now each time your movie plays frame 48 in Section 1, it will look ahead to see if the last frame in Section2 is downloaded, and if it is, it’ll jump to the beginning of that section. If not, the Timeline will proceed normally to frame 49 where the GoTo action kicks in to send the Timeline back to the beginning to try again. This guarantees that no matter how long it takes to download your movie, all of your users will see a constant seamless animation. Okay, now go pull out the mag to see how to send your e-card to the masses.
  16.  
  17. -----------------------------
  18.  
  19. Glossary of Flash Terms
  20.  
  21. ActionScript—Flash’s Scripting language. It’s ECMA-262 compliant and very similar to JavaScript.
  22.  
  23. Keyframe—Frames in the Timeline that contain stored changes. Keyframes are indicated by a small circle in a Timeline frame.
  24.  
  25. Tweening—Flash will automatically animate, or tween, the properties of graphics from one keyframe to the next. Motion Tweening animates the position, rotation, scale, or distortion of a Group or Symbol. Shape Tweening morphs one shape into another over time. You can also tween the color and transparency of a symbol.
  26.  
  27. Shockwave—Macromedia’s technology for compressing and streaming media. The file format for a “Shocked” Flash file is .swf.
  28.  
  29. Symbol—Content stored in a Flash file as a reusable object. There are three types--graphic symbols store simple graphics or animations; button symbols are used to create interactive objects; and movie clips, which are movies within movies, can contain graphics, animation, sounds and interactivity.
  30.  
  31. Bandwidth Profiler—A tool for measuring the size of every Flash movie frame, and testing how it will download from various connection speeds.
  32.  
  33. Event Audio—When sound in a Flash movie is set to be an Event sound, it must fully download before it can play and often does not stay in sync with the Timeline. If you set your sound to “Start,” it’s almost the same as an Event sound except the file won’t play more than one instance of the sound at a time.
  34.  
  35. Streaming Audio—When sound is set to “Stream,” it downloads as it goes and remains in sync with visual material in the Timeline.